<?php
/**
 * Created by PhpStorm.
 * User: yy
 * Date: 2018/4/18
 * Time: 20:21
 */

namespace app\checkdate;


use think\Exception;
use think\Request;
use think\Validate;

class BaseValidate extends Validate
{
    public function goCheck(){
        //获取HTTP传入的参数
        $request = Request::instance();
        $params = $request->param();

        $result=$this->check($params);
        if(!$request){
            $error = $this->error;
            throw new Exception($error);
        }else{
            return true;
        }
    }
}